package cn.HK.service;

import cn.HK.mapper.RegisterMapper;
import cn.HK.po.Emp;
import cn.HK.utils.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.UUID;

@Service
public class RegisterService {
    @Autowired(required = false)
    private RegisterMapper registerMapper;
    /*
    注册用户
     */
    public void doRegister(Emp emp) {
       /* String empId=UUID.randomUUID().toString();
        emp.seteId(empId);*/
        //密码进行MD5加密
        System.out.println(emp.geteGender());
        emp.setePassword(MD5Util.md5(emp.getePassword()));
        registerMapper.insertEmp(emp);


    }

}
